home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3526 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  983 b 

  1. Path: news2.ios.com!usenet
  2. From: vlad@gramercy.ios.com (Vlastimil Adamovsky)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Template ...
  5. Date: Wed, 24 Jan 1996 16:50:37 GMT
  6. Organization: Internet Online Services
  7. Message-ID: <4e5nkq$hq0@news2.ios.com>
  8. References: <4e478k$pnh@alibaba.kmit.sk>
  9. NNTP-Posting-Host: ppp-33.ts-7.hck.idt.net
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. brano@alibaba (Brano Zahradnik) wrote:
  13.  
  14. >What do you thing about this:
  15.  
  16. > #include <stdio.h>
  17. > template < void (*T) (char *) >
  18. > class alfa
  19. > {
  20. >   private:
  21. >     char * t;
  22. >   public:
  23. >     alfa (char * a) {t=a;};
  24. >     void print (void) {T(t);};
  25. > };
  26.  
  27. > void Print (char * a)
  28. > {
  29. >   printf(a);
  30. > }
  31.  
  32. > void main (void)
  33. > {
  34. >   alfa<Print> a("LALALALA");
  35. >   a.print();
  36. > }
  37.  
  38. >                 brano@alibaba.kmit.sk
  39.  
  40. What was the point?
  41.  
  42.  
  43.  
  44. *******************************************
  45. *    Vlastimil Adamovsky                  *
  46. *  Smalltalk and C++ development          *
  47. *******************************************
  48.  
  49.